from django.conf.urls.defaults import patterns, include, url
from spargameproject.settings import MEDIA_ROOT

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    (r'^openid/', include('django_openid_auth.urls')),
    (r'^login/', 'spargameproject.views.openid_login'),
    (r'^signIn/', 'spargameproject.views.signIn'),
    (r'^updateProfile/', 'spargameproject.views.updateProfile'),
    (r'^joinGame/', 'spargameproject.views.joinGame'),
    (r'^playGame/', 'spargameproject.views.playGame'),
    (r'^quitGame/', 'spargameproject.views.quitGame'),
    (r'^createGame/', 'spargameproject.views.createGame'),
    (r'^createPlayer/', 'spargameproject.views.createPlayer'),
    (r'^makePlay/', 'spargameproject.views.makePlay'),
    (r'^getAvatarFiles/', 'spargameproject.views.getAvatarFiles'),
    (r'^valentimes/', 'spargameproject.views.valentimes'),
    (r'^cancelPlay/', 'spargameproject.views.cancelPlay'),
    (r'^getBots/', 'spargameproject.views.getBots'),
    (r'^getNameAndAvatar/', 'spargameproject.views.getNameAndAvatar'),
    (r'^updateConnectedStatus/', 'spargameproject.views.updateConnectedStatus'),
    (r'^uploadImage/', 'spargameproject.views.uploadImage'),
    (r'^setAvatarFromUpload/', 'spargameproject.views.setAvatarFromUpload'),
    (r'^isPlayerNameUnique/', 'spargameproject.views.isPlayerNameUnique'),
    (r'^logout/', 'spargameproject.views.openid_logout'),
    (r'^processlogin/', 'spargameproject.views.processlogin'),
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root' : MEDIA_ROOT}),
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root' : MEDIA_ROOT}),
    (url(r'^$', 'spargameproject.views.showAvailableGames')),
)
